	function Floor(lc, tip){
					this.lc = lc;	// 每一层
					this.tip = tip;	// 楼层按钮
					this.init();//初始化
				}
				
				Floor.prototype.init = function(){
					// 获取每一层的距离顶点的间距
					this.arr = this.lc.map(function( ind, elem ){//遍历lc，ind是下标，elem是本标签
						//console.log(elem.offsetTop)
						return 	$(elem).offset().top;//jq
					});
					
					
					// 最后一层
					var len = this.arr.length;
					this.arr.push( this.arr[len-1] + $(this.lc[len-1]).height() ) ;	// jq
					
				//	/console.log(this.arr.length)//11
					// 给top绑定点击事件，让其返回到顶部
					this.tip.find("ul>li").click(function(){
						$("html,body").animate({"scrollTop": 0});
					});
					
					
					this.tip.find("ol>li").click(function(){
						var ind = $(this).index();
						console.log(ind)
						if(ind==0){
							$("html,body").stop().animate({"scrollTop":"742px"},2000);//兼容
						}else if(ind==1){
							$("html,body").stop().animate({"scrollTop": "1710px"},2000);//兼容
						}else if(ind==2){
							$("html,body").stop().animate({"scrollTop": "2675px"},2000);//兼容
						}else if(ind==3){
							$("html,body").stop().animate({"scrollTop": "3648px"},2000);//兼容
						}else if(ind==4){
							$("html,body").stop().animate({"scrollTop": "4615px"},2000);//兼容
						}else if(ind==5){
							$("html,body").stop().animate({"scrollTop": "5585px"},2000);//兼容
						}else if(ind==6){
							$("html,body").stop().animate({"scrollTop": "6550px"},2000);//兼容
						}else if(ind==7){
							$("html,body").stop().animate({"scrollTop": "7520px"},2000);//兼容
						}else if(ind==8){
							$("html,body").stop().animate({"scrollTop": "8450px"},2000);//兼容
						}else{
							$("html,body").stop().animate({"scrollTop": "9460px"},2000);//兼容
						}
						
						
						
						
						
					});
					var that = this;
					// 滚动条事件
					$(window).scroll(function(){
						// 屏幕高度的一半
						var h = $(window).height()/2;
						var st = $(document).scrollTop();// jq
						
						if( st>h ){
							that.tip.fadeIn();
						}else{
							that.tip.fadeOut();
						}
						var ind = -1;
						for( var i=0, a=that.arr, l=a.length; i<l-1; i++ ){
							var min = a[i];
							var max = a[i+1];
							if( min < st+h && st+h < max ){
								ind = i;
							}
						}
						that.tip.find("ol>li").removeClass("selected");
						if(ind != -1){		
							that.tip.find("ol>li").eq(ind).addClass("selected");
						}
					});
				}

	

var f = new Floor( $(".lc"), $(".tip") );